function fetchMessages(callback) {
  wx.request({
    url: 'rm-cn-to340ipxl000hbio.rwlb.rds.aliyuncs.com', 
    method: 'GET',
    success: (res) => {
      if (res.statusCode === 200) {
        callback(null, res.data);
      } else {
        callback('加载失败');
      }
    },
    fail: (err) => {
      callback('请求失败');
    }
  });
}

module.exports = {
  fetchMessages: fetchMessages
};